package xyz.xtt.exchange.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 资产交易记录表
 * </p>
 *
 * @author author
 * @since 2024-10-31
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tbl_asset_transaction")
@ApiModel(value = "TblAssetTransaction对象", description = "资产交易记录表")
public class TblAssetTransaction implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "id")
	@TableId(value = "order_id", type = IdType.AUTO)
	private Long orderId;

	@ApiModelProperty(value = "资产表ID")
	private Long assetId;

	@ApiModelProperty(value = "卖家用户ID(业务系统)")
	private String sellerUserId;

	@ApiModelProperty(value = "卖家区块链账户")
	private String sellerChainAccount;

	@ApiModelProperty(value = "买家用户ID(业务系统)")
	private String buyerUserId;

	@ApiModelProperty(value = "买家区块链账户")
	private String buyerChainAccount;

	@ApiModelProperty(value = "交易状态0：进行中，1：完成，2：失败")
	private Integer dealState;

	@ApiModelProperty(value = "交易区块")
	private String dealBlockNum;

	@ApiModelProperty(value = "交易hash")
	private String dealHash;

	@ApiModelProperty(value = "上链时间")
	private Long upChainDatetime;

	@ApiModelProperty(value = "建立交易时间")
	private Long dealCreateDatetime;

	@ApiModelProperty(value = "完成交易时间")
	private Long dealFinishDatetime;

	@ApiModelProperty(value = "创建支付订单时间（支付中心）")
	private Long playCreateOrderDatetime;

	@ApiModelProperty(value = "订单编号  会重")
	private String orderNo;

	@ApiModelProperty(value = "交易流水号（支付中心）")
	private String tradeNo;

	@ApiModelProperty(value = "支付状态")
	private Integer payState;

	@ApiModelProperty(value = "支付类型0创建1加购（支付中心）")
	private Integer orderType;

	@ApiModelProperty(value = "支付价格")
	private BigDecimal price;

	@ApiModelProperty(value = "busId 商品id")
	private String goodsId;

	@ApiModelProperty(value = "出售方式 0:出售1：寄售2：赠送3：拍卖")
	private Integer sellPattern;

	@ApiModelProperty(value = "计价单价 0通宝1通钻2人民币")
	private Integer unit;

}
